﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OOAD_Project_Engine.Foundation.Interfaces;

namespace OOAD_Project_Editor.Domain
{
    class EntityClipboard
    {
        //Stack<IEntity> entities;
        //Stack<IEntityComponent> components;

       static IEntity queuedEntity;

        protected EntityClipboard()
        {
            //entities = new Stack<IEntity>();
            //components = new Stack<IEntityComponent>();
        }

        public void SetEntity(IEntity entity)
        {
            queuedEntity = entity;
        }

        public IEntity GetEntity()
        {
            if (queuedEntity == null)
                throw new Exception("null");
            return queuedEntity;
        }

        public bool IsEmpty()
        {
            return queuedEntity == null;
        }

        //public void PushEntityComponent(IEntityComponent component) {
        //    if (!components.Contains(component))
        //        components.Push(component);
        //}

        //public IEntityComponent PopEntityComponent()
        //{
        //    return components.Pop();
        //}

        public static EntityClipboard GetInstance()
        {
            return new EntityClipboard();
        }

    }
}
